const app = getApp(),url = app.globalData.url;
Page({
  data: {
    list:'1',
    status:'',
    jlzt: '',
    approval: ''
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    
  },
  look(e){
    var url = e.currentTarget.dataset.url//简历连接
    wx.navigateTo({
      url: url,
    })
  },
  addonline(e){
    var url = e.currentTarget.dataset.url
    wx.navigateTo({
      url: url,
    })
  },
  /**
   * 生命周期函数--监听页面显示
   */
  onShow () {
    var that = this
    var uid = wx.getStorageSync('user_massage')
    // 根据用户UID获取简历基本信息详情
    wx.request({
      url: url + 'cvBaseInfo/getCVBaseInfoByUserUid?user_uid='+uid.userUid,
      method: "GET",
      success(res){
        var ret = res.data
        if(ret.code != 200){
          wx.showToast({
            title: ret.msg,
            icon:'none'
          })
          return
        }
        if(!ret.data || !ret.data.id){
          that.setData({status:2})
          return
        }
        that.setData({
          id:ret.data.id,//用户ID
          name:ret.data.name,//用户姓名
          updateTime:ret.data.updateTime || '最近',//更新时间
          status:1,
          approval: ret.data.approval,
          jlzt: ret.data.jlzt
        })
      }
    })
  },

})